// 查询列表接口
const getSportPage = (params) => {
    return $axios({
        url: '/sport/page',
        method: 'get',
        params
    })
}

// 删除接口
const deleteSport = (ids) => {
    return $axios({
        url: `/sport/${ids}`,
        method: 'delete',
    })
}

// 修改 接口
const editSport = (params) => {
    return $axios({
        url: '/sport',
        method: 'put',
        data: { ...params }
    })
}

// 新增接口
const addSport = (params) => {
    return $axios({
        url: '/sport',
        method: 'post',
        data: { ...params }
    })
}

// 查询详情
const querySportById = (id) => {
    return $axios({
        url: `/sport/${id}`,
        method: 'get'
    })
}

// 获取菜品分类列表
const getCategoryList = (params) => {
    return $axios({
        url: '/category/listSport',
        method: 'get',
        params
    })
}

// 获取菜品分类列表
const getCategoryName = (id) => {
    return $axios({
        url: `/category/${id}`,
        method: 'get',
    })
}

// 查菜品列表的接口
const querySportList = (params) => {
    return $axios({
        url: '/sport/list',
        method: 'get',
        params
    })
}

// 文件down预览
const commonDownload = (params) => {
    return $axios({
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
        },
        url: '/common/download',
        method: 'get',
        params
    })
}

// 开始停止展示---批量 接口
const sportStatusByStatus = (params) => {
    return $axios({
        url: `/sport/status/${params.status}`,
        method: 'post',
        params: { ids: params.id }
    })
}